package com.markerhub.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableTransactionManagement
@MapperScan("com.markerhub.mapper")//指定要变成实现类的接口包
public class MybatisPlusconfig {

    @Bean//需要bean注入
    public PaginationInterceptor paginationInterceptor() { //分页插件
        PaginationInterceptor paginationInterceptor =new PaginationInterceptor();
        return paginationInterceptor;
    }
}
